from flask import make_response, current_app
from . import api


@api.route('/<re(".*"):file_name>')
def static_file(file_name):

    if not file_name:
        file_name = 'index.html'

    if file_name != 'favicon.ico':
        file_name = 'html/' + file_name

    resp = make_response(current_app.send_static_file(file_name))
    return resp
